package org.yly.game.rpggame.domain.model;


/**
 * 升级属性，属性暂时限Integer和String类型
 * 
 * @author makefu
 * 
 */
public class UpgradeProperty extends CustomProperty {

	private PropertyUpgrade propertyUpgrade;

	public UpgradeProperty(PropertyName name, int value, PropertyUpgrade propertyUpgrade) {
		super(name, value);
		this.propertyUpgrade = propertyUpgrade;
	}

	/**
	 * 属性升级
	 * @param level
	 */
	public void upgrade(int level) {
		this.initValue = this.propertyUpgrade.upgrade(name, level);
	}
}
